<!DOCTYPE html>
{% load i18n %}
<html lang="zh-CN">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <link rel="shortcut icon" type="image/png" href="/static/favicon.ico"/>
    <link rel="apple-touch-icon" href="/static/apple-touch-icon.png">
    {% include '../show/link.html' %}
    <title>{% trans '个人信息' %}</title>
    <style>
        .errorlist {
            color: red;
        }
    </style>

    <style>
        .main_body {
            min-height: 700px;
        }
        .this-fs {
            font-size: 14px;
        }
        .change_password .panel-heading-title {
            font-size:20px;
            margin: 20px 20px 20px 20px;
            border-bottom:1px solid #f1f1f1
        }
    </style>

    <script>
        $(document).ready(function() {
            $("#safe").addClass("active");
        })
    </script>
</head>

<body>
{% include '../show/top_bar.html' %}
<div class="main_body">
    <br>
    <div class="container">
        {% include '../userinfo/sider.html' %}
        <div class="col-md-9 main-left this-fs ">
            <div class="panel change_password ">
                <div class="panel-heading">
                    <div class="panel-heading-title">{% trans '修改密码' %}</div>
                </div>
                <div class="panel-body">
                    <div class="col-sm-offset-2 col-sm-8 col-xs-8">
                        <form class="form" action="{% url 'users:password_change' %}" method="post">
                            {% csrf_token %}
                            {{ form.non_field_errors }}
                            <div class="form-group">
                                <label for="id_old_password control-label">{% trans '旧密码' %}:</label>
                                <input class="form-control" type="password" name="old_password" autofocus required id="id_old_password"/>
                            </div>
                            <div class="form-group">
                                <label for="id_new_password1 control-label">{% trans '新密码' %}:</label>
                                <input class="form-control" type="password" name="new_password1" required id="id_new_password1"/>
                                <p class="help text-small text-muted">
                                <ul>
                                    <li>{% trans '你的密码必须包含至少8个字符且不能全部为数字' %}</li>
                                </ul>
                                </p>

                            </div>
                            <div class="form-group">
                                <label for="id_new_password2 control-label">{% trans '新密码确认' %}:</label>
                                <input class="form-control" type="password" name="new_password2" required id="id_new_password2"/>
                            </div>
                            <div class="form-group">
                                {% for field in form %}
                                <!--
                                {{ field.label_tag }}
                                {{ field }}
                                -->
                                {{ field.errors }}
                                {% endfor %}
                            </div>
                            <div class="form-group">
                                <button type="submit" class="btn btn-primary btn-block">{% trans '提交' %}</button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{% include '../show/footer.html' %}
</body>
</html>
